<?php

use yii\db\Migration;

/**
 * Handles the creation of table `archive_addon_diary`.
 */
class m170320_075803_create_archive_addon_diary_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('{{%archive_addon_diary}}', [
            'id' => $this->integer(11)->comment('文档序号'),
            'observer' => $this->string(200)->comment('观察对象'),
            'content' => $this->text()->comment('内容'),
        ]);
        $this->addPrimaryKey('primaryKey','{{%archive_addon_diary}}','id');

    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        $this->dropTable('{{%archive_addon_diary}}');
    }
}
